
const addOne = (tableHeader: any, tableData: any) => {
  const obj = {} as any
  for (const key in tableHeader) {
    if (tableHeader.type === 'select' ) {
      obj.tableHeader[key].prop = {
        type:obj.tableHeader[key].type,
        selectValue: '',
        options:tableHeader[key].options
      }
    } else {
      obj[tableHeader[key].prop] =''
    }
  }
  obj.addAndUpdate = true
  // obj.canChange = 'Y'
  obj.disableConfirm = true
  tableData.unshift(obj)
}

export {
  addOne
}